﻿<phone:PhoneApplicationPage
    x:Class="OnlineVideos.Views.OnlineShare"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">
   
    <phone:PhoneApplicationPage.Resources>
        <Style TargetType="ContentControl" x:Key="HintCustomStyle">
            <Setter Property="Foreground" Value="Gray"/>
        </Style>
        <DataTemplate  x:Key="tblkcat">
            <TextBlock Foreground="Gray"  FontSize="40" FontFamily="Calibri" FontWeight="Normal" LineHeight="60" Loaded="TextBlock_Loaded_1" Text="{Binding}"></TextBlock>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,0">
            <Image x:Name="imgLogo"  Style="{StaticResource PivotTitle}"  Margin="10,0,0,0"/>
            <TextBlock x:Name="tblkVideosTitle" Foreground="White"  Text="Online Video Mixes"  Style="{StaticResource DetailPagePivotTitle}"/>
        </StackPanel>
        <Grid  Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            

                <StackPanel x:Name="stk" Orientation="Horizontal"  Grid.Row="0">
                <StackPanel Orientation="Horizontal">
                    <StackPanel  Orientation="Horizontal" >
                        <TextBlock Margin="10,20,0,0" FontSize="22" Visibility="Collapsed" Foreground="White" Text="Choose Category" TextWrapping="Wrap"   Height="80" Width="150"></TextBlock>
                        <toolkit:ListPicker BorderBrush="White" x:Name="CategoryList" Width="200" Foreground="Gray" FontSize="22" FullModeItemTemplate="{StaticResource tblkcat}" FullModeHeader="--Select Type--">
                        </toolkit:ListPicker>
                    </StackPanel>
                    <toolkit:PhoneTextBox Margin="6,0,0,0" KeyUp="TbSearch_KeyUp_1" LengthIndicatorVisible="False"  Foreground="Black" BorderBrush="White" Width="230" Height="80"   x:Name="TbSearch" Hint="Search" HintStyle="{StaticResource HintCustomStyle}"></toolkit:PhoneTextBox>
                </StackPanel>
                <Button Height="70" Visibility="Collapsed" Width="90" Foreground="White" BorderBrush="White" Click="Button_Click_1" Content="GO"></Button>
            </StackPanel>
           
            <ListBox x:Name="OnlineList" Grid.Row="1" Margin="0,10,0,0">
            <ListBox.ItemTemplate>
                <DataTemplate>
                        <StackPanel Orientation="Horizontal" DataContext="{Binding extra}" Margin="0,10,0,0" >
                            <CheckBox VerticalAlignment="Top" Background="LightGray" Visibility="{Binding Control}" Height="70" Width="50" Tag="{Binding Id}" Checked="CheckBox_Checked_1" Unchecked="CheckBox_Unchecked_1"></CheckBox>
                            <Image Height="190" VerticalAlignment="Top" Width="130"  Source="{Binding ImageUrl}"></Image>
                            <StackPanel  VerticalAlignment="Top" Orientation="Vertical" Width="275" Height="190">
                                <TextBlock FontWeight="Bold" x:Name="Tbtitle" Text="{Binding Title}" Foreground="White" Tap="Tbtitle_Tap_1" FontSize="24" Margin="20,10,0,0"></TextBlock>
                                <TextBlock Width="265"  Height="140" x:Name="txdes" Visibility="{Binding Control}" Foreground="White" Text="{Binding TileDesc}"  FontSize="18" TextWrapping="Wrap" TextTrimming="WordEllipsis" Margin="20,10,0,0" ></TextBlock>
                            </StackPanel>
                        </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
            <TextBlock x:Name="notavailable" Grid.Row="1" Text="video mixes not available" Visibility="Visible" Foreground="White" FontSize="24" Margin="0,100,0,0" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
        </Grid>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>

        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.download.rest.png" Text="Download" Click="ApplicationBarIconButton_Click_1"/>
          
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="sort" Text="Sort By Published Date" Click="sort_Click_1" />
              

            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>